This forum is closed to new posts and
responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:
My Actual Code (Minus the correct UserNames) ~Laura Nimvelugenoden 19.Jan.04 11:07 PM a Web browser Domino Designer All ReleasesAll Platforms
Here is the code exactly - I corrected the missing $ - (They did not cause an error in my code)
==========================
***** DECLARATIONS *****
Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim docItem As NotesItem
Dim InData As String
Dim fileNum As Integer
Dim counter As Integer
Dim countRec As Integer
Dim x As Integer
==========================
***** Initialize *****
Sub Initialize
Redim Infox(20) As String
Set session = New NotesSession
Set db = session.CurrentDatabase
fileNum% = Freefile()
counter% = 0
Open "c:\lotus\notes\data\assignments.txt" For Input As fileNum%
countRec% = 0
Do While Not Eof(fileNum%)
Line Input #fileNum%, InData$
counter% = counter% + 1
If Len(InData$) > 100 Then
If counter% = 1 Then
Set doc = New NotesDocument(db)
Call doc.ReplaceItemValue "Form",Left$(InData$,3))
Call doc.ReplaceItemValue("SendTo","John Smith/Boston")
Call doc.ReplaceItemValue("From","Test User/Boston")
Call doc.ReplaceItemValue("ReturnReceipt","0")
Infox(counter%-1) = Mid$(InData$,56,114)
Call doc.ReplaceItemValue("Detail",Mid$(InData$,56,114))
Else
Infox(counter%-1) = Mid$(InData$,56,114)
End If
countRec% = countRec% + 1
Elseif Left$(InData,5) = "$$$$$" Then
Call doc.ReplaceItemValue("Detail",Infox)
Call doc.save(True, False)
Call doc.Send(True, "John Smith/Boston")
Redim Infox(20)
countRec% = 0
counter% = 0
Else
countRec% = 0
End If
Loop
Close fileNum%
End Sub